<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<%
	String path = request.getContextPath() + "/";
	String basePath = request.getScheme() + "://"
			+ request.getServerName() + ":" + request.getServerPort()
			+ path + "/";
%>
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>发布采购订单</title>
<meta
	content='width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no'
	name='viewport'>
<!-- bootstrap 3.0.2 -->
<link href="<%=path%>bootstrap/css/bootstrap.min.css" rel="stylesheet"
	type="text/css" />
<!-- font Awesome -->
<link href="<%=path%>bootstrap/css/font-awesome.min.css"
	rel="stylesheet" type="text/css" />
<!-- Ionicons -->
<link href="<%=path%>bootstrap/css/ionicons.min.css" rel="stylesheet"
	type="text/css" />
<!-- DATA TABLES -->

<!-- Theme style -->

<link href="<%=path%>bootstrap/css/bootstrap.min.css" rel="stylesheet"
	type="text/css" />
<link rel="stylesheet" type="text/css"
	href="<%=path%>css/jquery.dataTables.min.css">
<link type="text/css" rel="stylesheet"
	href="<%=path%>css/dataTables.tableTools.css" />
<link type="text/css" rel="stylesheet"
	href="<%=path%>css/dataTables.bootstrap.css" />
<link href="<%=path%>bootstrap/css/AdminLTE.css" rel="stylesheet"
	type="text/css" />


<script type="text/javascript" src="<%=path%>js/jquery.js"></script>
<script type="text/javascript"
	src="<%=path%>js/jquery.dataTables.min.js"></script>
<script src="<%=path%>js/bootstrap.min.js" type="text/javascript"></script>
<script src="<%=path%>js/purchase.js" type="text/javascript"></script>
<script src="<%=path%>js/common.js" type="text/javascript"></script>

</head>
<body class="skin-blue">
	<!-- Bootstrap -->
	<script src="<%=basePath%>bootstrap/js/bootstrap.min.js"
		type="text/javascript"></script>
	<!-- Morris.js charts -->
	<script src="<%=basePath%>bootstrap/js/raphael-min.js"></script>
	<script src="<%=basePath%>bootstrap/js/plugins/morris/morris.min.js"
		type="text/javascript"></script>
	<!-- Sparkline -->
	<script
		src="<%=basePath%>bootstrap/js/plugins/sparkline/jquery.sparkline.min.js"
		type="text/javascript"></script>
	<!-- jvectormap -->
	<script
		src="<%=basePath%>bootstrap/js/plugins/jvectormap/jquery-jvectormap-1.2.2.min.js"
		type="text/javascript"></script>
	<script
		src="<%=basePath%>bootstrap/js/plugins/jvectormap/jquery-jvectormap-world-mill-en.js"
		type="text/javascript"></script>
	<!-- fullCalendar -->
	<script
		src="<%=basePath%>bootstrap/js/plugins/fullcalendar/fullcalendar.min.js"
		type="text/javascript"></script>
	<!-- jQuery Knob Chart -->
	<script
		src="<%=basePath%>bootstrap/js/plugins/jqueryKnob/jquery.knob.js"
		type="text/javascript"></script>
	<!-- daterangepicker -->
	<script
		src="<%=basePath%>bootstrap/js/plugins/daterangepicker/daterangepicker.js"
		type="text/javascript"></script>
	<!-- Bootstrap WYSIHTML5 -->
	<script
		src="<%=basePath%>bootstrap/js/plugins/bootstrap-wysihtml5/bootstrap3-wysihtml5.all.min.js"
		type="text/javascript"></script>
	<!-- iCheck -->
	<script src="<%=basePath%>bootstrap/js/plugins/iCheck/icheck.min.js"
		type="text/javascript"></script>

	<!-- AdminLTE App -->
	<script src="<%=basePath%>bootstrap/js/AdminLTE/app.js"
		type="text/javascript"></script>

	<!-- AdminLTE dashboard demo (This is only for demo purposes) -->
	 <%-- <script src="<%=basePath%>bootstrap/js/AdminLTE/dashboard.js"
		type="text/javascript"></script>  --%>

	<%@include file="../header.jsp"%>
	<!--静态包含-->
	<%@include file="../left.jsp"%>
	<!--静态包含-->


	<!-- Right side column. Contains the navbar and content of the page -->
	<aside class="right-side"> <!-- Content Header (Page header) -->
	<section class="content-header">
	<h1>
		采购订单管理 <small>发布采购订单</small>
	</h1>
	</section> <section class="content">
	<div class="row">
		<div class="col-xs-12">


			<div class="box">
				<div class="box-header">
				</div>
				<!-- /.box-header -->

				<!-- <input type="button" value="新增" onclick="new()"> -->
				<div class="box-body table-responsive">
					<table id="example1" class="table table-bordered table-striped">
						<thead>
							<tr>
								<th><input type="checkbox" name="allChecked" /></th>
								<th>id</th>
								<th>采购订单</th>
								<th>开始时间</th>
								<th>结束时间</th>
								<th>描述</th>
								<th>状态</th>
								<th>操作</th>
							</tr>
						</thead>
					</table>
				</div>
			</div>
		</div>
	</div>




	</section><!-- /.content --> </aside>
	<!-- /.right-side -->
	</div>
	<!-- ./wrapper -->

	<!--新增页面开始-->
	<div class="modal fade" id="myModal-add-info" tabindex="-1"
		role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
		<div class="modal-dialog">
			<div class="modal-content">
				<div class="modal-header">
					<button type="button" class="close" data-dismiss="modal"
						aria-hidden="true">&times;</button>
					<h4 class="modal-title" id="myModalLabel">新 增</h4>
				</div>
				<form class="form-horizontal" role="form" action="" method="post"
					id="Insertpruchase">
					<div class="modal-body">
						<div class="form-group">
							<label class="col-sm-3 control-label no-padding-right">采购名称：
							</label>

							<div class="col-sm-9">
								<input type="text" class="form-control" id="rolenameid"
									name="name" style="width: 250px" maxlength="15"
									placeholder="10个汉字以内" />

							</div>
						</div>

						<div class="form-group">
							<label class="col-sm-3 control-label no-padding-right">开始时间：
							</label>

							<div class="col-sm-9">
								<input type="text" class="form-control" id="rolenameid"
									name="starttime" style="width: 250px" maxlength="15"
									placeholder="10个汉字以内" />

							</div>
						</div>

						<div class="form-group">
							<label class="col-sm-3 control-label no-padding-right">结束时间：
							</label>

							<div class="col-sm-9">
								<input type="text" class="form-control" id="rolenameid"
									name="endtime" style="width: 250px" maxlength="15"
									placeholder="日期格式：xxxx-xx-xx" />

							</div>
						</div>

						<div class="form-group">
							<label class="col-sm-3 control-label no-padding-right">采购描述：
							</label>

							<div class="col-sm-9">
								<input type="text" class="form-control" id="rolenameid"
									name="detail" style="width: 250px" maxlength="15"
									placeholder="10个汉字以内" />

							</div>
						</div>

						<div class="form-group">
							<label class="col-sm-3 control-label no-padding-right">状态信息：
							</label>

							<div class="col-sm-9">
								<select class=" sortNumber form-control" name="state"
									id="roledetailid" style="width: 250px">
									<option value="1">正常</option>
									<option value="2">已取消</option>
								</select>
							</div>
						</div>

					</div>
					<div class="modal-footer">
						<button type="button" class="btn btn-default" data-dismiss="modal">关闭
						</button>
						<button type="button" class="btn btn-primary" id="btnsubmit"
							onclick="pruchaseadd()">提交</button>
					</div>
				</form>
			</div>
			<!-- /.modal-content -->
		</div>
	</div>
	<!-- 新增页面结束 -->

	<!--查看页面开始-->
	<div class="modal fade" id="myModal-selected-info" tabindex="-1"
		role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
		<div class="modal-dialog">
			<div class="modal-content">
				<div class="modal-header">
					<button type="button" class="close" data-dismiss="modal"
						aria-hidden="true">&times;</button>
					<h4 class="modal-title" id="myModalLabel">详 情</h4>
				</div>
				<form class="form-horizontal" role="form" action="" method="post"
					id="category_add">
					<div class="modal-body">
						<div class="form-group">
							<label class="col-sm-3 control-label no-padding-right">采购名称：
							</label>

							<div class="col-sm-9">
								<input type="text" class="form-control" id="updatenameid"
									name="name" style="width: 250px" maxlength="15"
									placeholder="10个汉字以内" readonly="readonly" />
							</div>
						</div>
						<div class="form-group">
							<label class="col-sm-3 control-label no-padding-right">开始时间：
							</label>

							<div class="col-sm-9">
								<input type="text" class="form-control" id="updatestarttimeid"
									name="starttime" style="width: 250px" maxlength="15"
									placeholder="10个汉字以内" readonly="readonly" />
							</div>
						</div>
						<div class="form-group">
							<label class="col-sm-3 control-label no-padding-right">结束时间：
							</label>

							<div class="col-sm-9">
								<input type="text" class="form-control" id="updateendtimeid"
									name="endtime" style="width: 250px" maxlength="15"
									placeholder="10个汉字以内" readonly="readonly" />
							</div>
						</div>
						<div class="form-group">
							<label class="col-sm-3 control-label no-padding-right">采购描述：
							</label>

							<div class="col-sm-9">
								<input type="text" class="form-control" id="updatedetailid"
									name="detail" style="width: 250px" maxlength="15"
									placeholder="10个汉字以内" readonly="readonly" />
							</div>
						</div>
						<div class="form-group">
							<label class="col-sm-3 control-label no-padding-right">采购状态：
							</label>

							<div class="col-sm-9">
								<input type="text" class="form-control" id="updatestateid"
									name="state" style="width: 250px" readonly="readonly" />
							</div>
						</div>
						<div class="form-group">
							<label class="col-sm-3 control-label no-padding-right">酒产品:
							</label>

							<div class="col-sm-9">
								<table width="200">
									<c:forEach items="${list1}" var="aa">
										<tr>
											<td><input type="text" class="form-control"
												id="updatestateid" name="state" style="width: 250px"
												readonly="readonly" value="${aa.proname}" /></td>
										</tr>
									</c:forEach>
								</table>
							</div>
						</div>
					</div>
					<div class="modal-footer">
						<button type="button" class="btn btn-default" data-dismiss="modal">关闭
						</button>
						<!-- <button type="button" class="btn btn-primary" id="btnsubmit"
							onclick="syroleupdata()">提交</button> -->
					</div>
				</form>
			</div>
			<!-- /.modal-content -->
		</div>
	</div>
	<!-- 查看页面结束 -->

	<!--添加页面开始-->
	<div class="modal fade" id="myModal-update-info" tabindex="-1"
		role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
		<div class="modal-dialog">
			<div class="modal-content">
				<div class="modal-header">
					<button type="button" class="close" data-dismiss="modal"
						aria-hidden="true">&times;</button>
					<h4 class="modal-title" id="myModalLabel">添 加</h4>
				</div>
				<form class="form-horizontal" role="form" action="" method="post"
					id="category_add">
					<div class="modal-body">
						<div class="form-group">
							<label class="col-sm-3 control-label no-padding-right">酒名称：
							</label>
							<div class="col-sm-9">
								<c:forEach items="${list}" var="a">
									<input type="checkbox" id="insertwid" value="${a.id}"
										name="wid" />${a.proname }
						        </c:forEach>
								<input type="hidden" class=" sortNumber form-control"
									name="phid" id="insertphid" style="width: 250px" />
							</div>
						</div>
					</div>
					<div class="modal-footer">
						<button type="button" class="btn btn-default" data-dismiss="modal"
							onclick="c()">关闭</button>
						<button type="button" class="btn btn-primary" id="btnsubmit"
							onclick="purchasesubinsert()">提交</button>
					</div>
				</form>
			</div>
			<!-- /.modal-content -->
		</div>
	</div>
	<!-- 添加页面结束 -->
	<!-- 订单修改开始 -->
	<div class="modal fade" id="myModal-updatepurchase-info" tabindex="-1"
		role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
		<div class="modal-dialog">
			<div class="modal-content">
				<div class="modal-header">
					<button type="button" class="close" data-dismiss="modal"
						aria-hidden="true">&times;</button>
					<h4 class="modal-title" id="myModalLabel">订单修改</h4>
				</div>
				<form class="form-horizontal" role="form" action="" method="post"
					id="updatepurchase">
					<div class="modal-body">
						<div class="form-group">
							<label class="col-sm-3 control-label no-padding-right">采购名称：
							</label>

							<div class="col-sm-9">
								<input type="text" class="form-control" id="updatepurchasename"
									name="name" style="width: 250px" maxlength="15"
									placeholder="10个汉字以内"  />
							</div>
						</div>
						<div class="form-group">
							<label class="col-sm-3 control-label no-padding-right">开始时间：
							</label>

							<div class="col-sm-9">
								<input type="text" class="form-control" id="updatepurchasestarttime"
									name="starttime" style="width: 250px" maxlength="15"
									placeholder="10个汉字以内" readonly="readonly" />
							</div>
						</div>
						<div class="form-group">
							<label class="col-sm-3 control-label no-padding-right">结束时间：
							</label>

							<div class="col-sm-9">
								<input type="text" class="form-control" id="updatepurchaseendtimei"
									name="endtime" style="width: 250px" maxlength="15"
									placeholder="10个汉字以内"  readonly="readonly"/>
							</div>
						</div>
						<div class="form-group">
							<label class="col-sm-3 control-label no-padding-right">采购描述：
							</label>

							<div class="col-sm-9">
								<input type="text" class="form-control" id="updatepurchasedetail"
									name="detail" style="width: 250px" maxlength="15"
									placeholder="10个汉字以内"  />
								<input type="hidden" class="form-control" id="updatepurchaseid"
									name="id" style="width: 250px" maxlength="15"
									placeholder="10个汉字以内"  />
							</div>
						</div>
						<div class="form-group">
							<label class="col-sm-3 control-label no-padding-right">采购状态：
							</label>

							<div class="col-sm-9">
								<select type="text" class="form-control" id="updatepurchasestate"
									name="state" style="width: 250px" >
									<option value="1">正常</option>
									<option value="2">已取消</option>
								</select>
							</div>
						</div>
					</div>
					<div class="modal-footer">
						<button type="button" class="btn btn-default" data-dismiss="modal">关闭
						</button>
						 <button type="button" class="btn btn-primary" id="btnsubmit"
							onclick="updatepurchasest()">提交</button> 
					</div>
				</form>
			</div>
			<!-- /.modal-content -->
		</div>
	</div>
</body>
</html>